//
//  CategoryLabelsView.h
//  CToolBox
//
//  Created by crj on 16/8/10.
//  Copyright © 2016年 oyf. All rights reserved.
//

#import <UIKit/UIKit.h>


@protocol CategoryLabelsViewDelegate <NSObject>

@optional
//单选 点击后回调
- (void)categoryActionWithIndex:(NSInteger)index;
//多选 点击后回调
- (void)categoryActionWithTitles:(NSArray *)titles;

@end

@interface CategoryLabelsView : UIView

@property (nonatomic, assign) BOOL isSingleSelect;//是否单选
@property (nonatomic, assign) NSInteger selectIndex;

@property (nonatomic, assign) id<CategoryLabelsViewDelegate> delegate;

- (instancetype)initWithFrame:(CGRect)frame labels:(NSArray *)labels target:(id)target;
- (instancetype)initWithFrame:(CGRect)frame labels:(NSArray *)labels target:(id)target isSingleSelect:(BOOL)isSingleSelect selectTitles:(NSArray *)selectTitles;

- (void)initLabelsWithArray:(NSArray *)labels;

//刷新状态（多选状态下）
- (void)reloadStateWithSelectTitles:(NSArray *)selectTitles;

@end
